# api/register_api.py
from flask import Blueprint, request, jsonify
from utils.response import success, error

register_bp = Blueprint('register', __name__)

@register_bp.route('/register', methods=['POST'])
def register():
    data = request.json
    username = data.get('username')
    email = data.get('email')
    if not username or not email:
        return error(message="email必填", )
    # 处理注册逻辑
    return success(data={"user_id": 123}, message="注册成功")